using SheLife.Domain.Common;

namespace SheLife.Domain.Entities;

public class Habit : BaseEntity
{
    public int UserId { get; set; }
    public string Title { get; set; } = string.Empty;
    public string Description { get; set; } = string.Empty;
    public string Category { get; set; } = string.Empty; // 健康、生活、美丽等
    public string Icon { get; set; } = string.Empty;
    public string Color { get; set; } = string.Empty;
    public bool IsPublic { get; set; } = false;
    public int TargetCount { get; set; } = 1; // 每日目标次数
    public string Frequency { get; set; } = "daily"; // daily, weekly, monthly
    public DateTime StartDate { get; set; } = DateTime.UtcNow;
    public DateTime? EndDate { get; set; }
    public bool IsActive { get; set; } = true;
    
    // 导航属性
    public virtual User User { get; set; } = null!;
    public virtual ICollection<HabitRecord> HabitRecords { get; set; } = new List<HabitRecord>();
}